﻿@model MVC3DEMO.Models.Post

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

    <script type="text/javascript" src="../../ckeditor/ckeditor.js"></script>
 

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Post</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

       
        <div class="editor-field">
           @Html.TextAreaFor(model => model.Body, new { @class = "ckeditor" })
            @Html.ValidationMessageFor(model => model.Body)
        </div>

      

        <div class="editor-label">
            @Html.LabelFor(model => model.Priority)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Priority)
            @Html.ValidationMessageFor(model => model.Priority)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Show)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Show)
            @Html.ValidationMessageFor(model => model.Show)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
   
    <script type="text/javascript" language="javascript">
        var folderImage = "~/Content/CkUpload/";
        var folderThumb = "~/Content/CkUpload/";
        CKEDITOR.replace('Body', { toolbar: 'MiniEditor', filebrowserBrowseUrl: '/CKEditorImage/GetPictures?folderImagesPath=' + folderImage + '&folderThumbsPath=' + folderThumb, height: 500 });

    </script>



<div>
    @Html.ActionLink("Back to List", "Index")
</div>
